Schmidt decomposition